import java.io.*;
public class Main {
	public static int fac(int a[])
	{
		int i,max=0;
		for(i=0;i<a.length;i++)
		{
			if(a[i]>max)
				max=a[i];
		}
		return max;
		
	}
	public static float fac1(int a[])
	{
		float sum=0,ave;
		int i;
		for(i=0;i<a.length;i++)
			sum=sum+a[i];
		ave=sum/a.length;
		return ave;
	}
	public static int fac2(int a[],int b)
	{
		int i;
		for(i=0;i<a.length;i++)
			if(a[i]==b)
				return i;
		return 0;
	}
	public static void main(String[] args ) {
		 int b[]= {1,2,3,4,5,6,7,8,9,0};
		 int i,n;
		 String s="";
		 System.out.println("最大元素为："+fac(b));
		 System.out.println("平均值为："+fac1(b));
		 System.out.println("请输入需要查找的值：");
		 try {
			 BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
			 s=in.readLine();
		 }catch(IOException e) {}
		 n=Integer.parseInt(s);
		 if(fac2(b,n)==0)
			 System.out.println("数组中没有该元素"); 
		 else
		 System.out.println("查找值的位置为："+fac2(b,n));
	}

}